package com.javaGather.demo1;

import java.util.HashMap;

public class HashSetDemo<E> {

    private HashMap<E, Object> map;

    static final Object PRESENT = new Object();

    public HashSetDemo() {
        map = new HashMap<>();
    }

    public void add(E e) {
        map.put(e, PRESENT);
    }

    @Override
    public String toString() {
        return "HashSetDemo{" +
                "map=" + map +
                '}';
    }
}
